﻿@using System.Runtime.Remoting.Messaging
@using System.Web.UI.WebControls
@using CloudClass.Models
@model CloudClass.ViewModels.CourseInfoDetail
@{
    Layout.Title = "课程详情";
}


<link href="~/Modules/CloudClass/Styles/classpage.css" rel="stylesheet" />
<div class="container topContainer white">
    <div class="row ">
        <div class="span5" style="padding: 5px; margin-left: 0px">
            <img src="@Href("~/Modules/CloudClass/Content/Class/images/class.jpg")" class="imginfo">
        </div>
        <div class="span5">
            <h3>@Model.CourseInfo.CourseName</h3>
            <p>
               
                @for (int i = 0; i < Model.CourseInfo.StarLevel; i++)
                {
                    <i class="icon-star"></i>
                }
                (600份评价)
            </p>
            <p>讲师：@Model.CourseInfo.UserInfo.UserName</p>
            <p>发布者：@Model.Publisher</p>
            <p>分类：@Model.CourseInfo.CourseClassify.ClassifyName</p>
         
            @if (Model.CourseInfo.IsFree == 1)
            {
                <p class="text-left text-info text-medium">免费</p>
            }
            else
            {
                <p class="text-left text-info text-medium">@Model.CourseInfo.Money</p>
            }
            
        </div>
        <div class="span2" style="padding-left: 65px">
            
            @if (Model.IsJoin == 0)
            {
                <div class="learnbtn" ></div>
            }
        </div>
        <input type="hidden" id="hdid" value="@Model.CourseInfo.Id"/>
    </div>
    <div class="row" style="margin-left: -1px; margin-bottom: -20px;">
        <div class="navbar">
            <div class="navbar-inner">

                <ul class="nav">
                    <li class="active"><a href="~/CloudClass/Class/ClassPage/@Model.CourseInfo.Id">主页</a></li>
                    <li><a href="~/CloudClass/Class/Note/@Model.CourseInfo.Id">笔记</a></li>
                    <li><a href="~/CloudClass/Class/Talk/@Model.CourseInfo.Id">讨论区</a></li>
                </ul>
                <ul class="nav pull-right">
                    <li><a href="~/CloudClass/Class/Question/@Model.CourseInfo.Id">问答</a></li>

                </ul>
            </div>
        </div>
    </div>
</div>

<div class="container" id="main">
    <div class="row left0 ">
        <div class="span10 left0 ">
            <div class="row-fluid subContainer padding10 white">
                <div class="alert alert-success">
                    适用人群：@Model.CourseInfo.ApplyCrowd
                </div>
                <h5>简介</h5>
                <p>
                    @Model.CourseInfo.CourseIntroduction
                </p>
            </div>
            <div class="row-fluid subContainer padding10 white">
                目录
            </div>
            <div class="row-fluid subContainer1 white">

                <ul class="nav nav-list" style="margin-top: 5px">
                    @foreach (var part in Model.LessonList.GroupBy(p => p.ChapterName))
                    {
                        <li class="nav-header">章节：@part.Key</li>
                        foreach (var lesson in Model.LessonList.Where(p=>p.ChapterName==part.Key).OrderBy(p=>p.LessonOrder))
                         {
                             <li><a>
                                    <div class="row-fluid">
                                        <div class="span2">课时 @lesson.LessonOrder</div>
                                        <div class="span8 text-center">@lesson.DirectoryName</div>
                                        <div class="span2 text-right"><i class="icon-play"></i>@lesson.TimeLength</div>
                                    </div>
                                </a>
                            </li>
                         }
                    }
                   
                </ul>
            </div>

            <div class="row-fluid subContainer padding10 white">

                <div class="span10">
                    <h5>学习过该课程的人还学习过：</h5>
                </div>
                <div class="span2">
                    <ul class="pager" style="margin-top: 0">
                        <li class="previous disabled">
                            <a href="#">&larr;</a>
                        </li>
                        <li class="next">
                            <a href="#">&rarr;</a>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="row-fluid subContainer1 white">
                <div class="row-fluid">
                    <div class="span3 text-center padding10">
                        <img src="@Href("~/Modules/CloudClass/Content/Class/images/class.jpg")" >
                    </div>
                    <div class="span7">
                        <h5>零基础或对PS有少许了解的人员</h5>
                        <p><small>课件吧</small></p>
                        <i class="icon-user"></i>(1000)<i class="icon-star"></i><i class="icon-star"></i><i class="icon-star"></i><i class="icon-star"></i><i class="icon-star"></i>
                    </div>
                    <div class="span2 text-center padding10">
                        <a class="btn">免费</a>
                    </div>

                </div>
                <hr />
                <div class="row-fluid">
                    <div class="span3 text-center padding10">
                        <img src="@Href("~/Modules/CloudClass/Content/Class/images/class.jpg")" >
                    </div>
                    <div class="span7">
                        <h5>零基础或对PS有少许了解的人员</h5>
                        <p><small>课件吧</small></p>
                        <i class="icon-user"></i>(1000)<i class="icon-star"></i><i class="icon-star"></i><i class="icon-star"></i><i class="icon-star"></i><i class="icon-star"></i>
                    </div>
                    <div class="span2 text-center padding10">
                        <a class="btn">免费</a>
                    </div>
                </div>
                <hr />
                <div class="row-fluid">
                    <div class="span3 text-center padding10">
                        <img src="@Href("~/Modules/CloudClass/Content/Class/images/class.jpg")" >
                    </div>
                    <div class="span7">
                        <h5>零基础或对PS有少许了解的人员</h5>
                        <p><small>课件吧</small></p>
                        <i class="icon-user"></i>(1000)<i class="icon-star"></i><i class="icon-star"></i><i class="icon-star"></i><i class="icon-star"></i><i class="icon-star"></i>
                    </div>
                    <div class="span2 text-center padding10">
                        <a class="btn">免费</a>
                    </div>
                </div>
                <hr />
                <div class="row-fluid">
                    <div class="span3 text-center padding10">
                        <img src="@Href("~/Modules/CloudClass/Content/Class/images/class.jpg")" >
                    </div>
                    <div class="span7">
                        <h5>零基础或对PS有少许了解的人员</h5>
                        <p><small>课件吧</small></p>
                        <i class="icon-user"></i>(1000)<i class="icon-star"></i><i class="icon-star"></i><i class="icon-star"></i><i class="icon-star"></i><i class="icon-star"></i>
                    </div>
                    <div class="span2 text-center padding10">
                        <a class="btn">免费</a>
                    </div>
                </div>
                <hr />
                <div class="row-fluid">
                    <div class="span3 text-center padding10">
                        <img src="@Href("~/Modules/CloudClass/Content/Class/images/class.jpg")" >
                    </div>
                    <div class="span7">
                        <h5>零基础或对PS有少许了解的人员</h5>
                        <p><small>课件吧</small></p>
                        <i class="icon-user"></i>(1000)<i class="icon-star"></i><i class="icon-star"></i><i class="icon-star"></i><i class="icon-star"></i><i class="icon-star"></i>
                    </div>
                    <div class="span2 text-center padding10">
                        <a class="btn">免费</a>
                    </div>
                </div>
            </div>
        </div>
        <div class="span3 left30">
            <div class="row subContainer padding10 white">
                <div class="row-fluid">
                    <div class="span2"></div>
                    <div class="span10"><img src="@Model.ImgUrl"  alt="@Model.Publisher" width="80%"></div>
                        
                    
                </div>
                <div class="row left5">
                    <p>
                        @Model.PublisherDesc
                    </p>
                </div>
            </div>
            <div class="row subContainer padding10 white">
                评价
            </div>
            <div class="row subContainer white" style="margin-top: -1px">
                @if (Model.IsJoin == 1)
                {
                     <div class="row-fluid left5 " id="evaldiv">
                        <div class="span9">
                            <textarea maxlength="100" placeholder="请输入评价" style="width: 180px" id="txteval"></textarea></div>
                        <div class="span3">
                            <a class="btn btn-mini eval">发表</a></div>
                    
                    </div>
                }
               
                @foreach (var eval in Model.EvaluationList)
                {
                    <div class="row  left0">
                        <div class="span1 left5">
                            <img src="@eval.UserInfo.UserPhoto" class="img-polaroid" width="50%">
                        </div>
                        <div class="span2 left5">
                            <a>@eval.UserInfo.UserName</a>@eval.EvaluationTime.ToString("yy-MM-dd")<i class="icon-star"></i><i class="icon-star"></i><i class="icon-star"></i><i class="icon-star"></i><i class="icon-star"></i>
                            <p><small>@eval.EvaluationContent</small></p>
                        </div>
                    </div>
                }
            </div>

            <div class="row subContainer padding10 white">
                @Model.UserInfoList.Count 人在学习该课程
            </div>
            <div class="row subContainer white" style="margin-top: -1px">
                <div class="row-fluid">
                   
                  
                    <ul class="thumbnails">
                        
                        @foreach (var user in Model.UserInfoList)
                        {
                            <li class="span3" style="margin-bottom: 5px">
                                <div class="thumbnail text-center" style="border: 0;">
                                    <img src="@user.UserPhoto" title="@user.UserName">
                                    <small>@user.UserName</small>
                                </div>
                            </li>
                        }
                    </ul>
                    <ul class="thumbnails">
                       @foreach (var user in Model.UserInfoList)
                        {
                            <li class="span3" style="margin-bottom: 5px">
                                <div class="thumbnail text-center" style="border: 0;">
                                    <img src="@user.UserPhoto" title="@user.UserName">
                                    <small>@user.UserName</small>
                                </div>
                            </li>
                        }
                    </ul>
                </div>
            </div>

            <div class="row subContainer padding10 white">
                精选问答
            </div>
            <div class="row subContainer white" style="margin-top: -1px">
                <div class="row-fluid">
                    <ul class="nav nav-list" style="margin-top: 10px; margin-bottom: 10px">
                       
                        @foreach (var question in Model.AskList)
                        {
                              <li>
                                <p class="left"><small>@question.Ask.AskTitle</small></p>
                                <small><a>答案(@question.AnswerCount)</a>|<a>投票(@question.VoteCount)</a> <small>来自：<a>@question.Ask.UserInfo.UserName</a></small>
                                </small>
                            </li>
                        }
                    </ul>
                </div>
            </div>


        </div>
    </div>
</div>

<script src="~/Modules/CloudClass/Scripts/classpage.js"></script>